Skip to content

Conversation

@jovanmaric
Copy link
Contributor

@jovanmaric jovanmaric commented Sep 23, 2025

Change Tinify::Source result instance method, to use a :post when a body is provided. Otherwise use a :get.

@jovanmaric jovanmaric force-pushed the fix/get_body branch 2 times, most recently from aaea43a to 69ce8aa Compare September 23, 2025 11:04
@jovanmaric jovanmaric requested a review from Copilot September 23, 2025 12:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the HTTP method selection in the result method to correctly use GET requests when no commands are present and POST requests when commands are present.

  • Changed result method logic to conditionally use GET vs POST based on presence of commands
  • Updated test descriptions and added comprehensive test coverage for both request types
  • Fixed test stubs to match the actual HTTP methods being used

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
lib/tinify/source.rb Modified result method to use GET for empty commands and POST for non-empty commands
test/tinify_source_test.rb Updated test stubs from GET to POST and added new test cases for request method verification

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jovanmaric jovanmaric merged commit a742f4b into master Oct 1, 2025
41 checks passed
@rkoopmans rkoopmans deleted the fix/get_body branch October 1, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants